<template>
  <div>
    <h1>新建分类</h1>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="账号">
        <el-input v-model="form.username"></el-input>
      </el-form-item>

         <el-form-item label="密码">
        <el-input type="text" v-model="form.password"></el-input>
      </el-form-item>
      <el-button @click="save()">创建</el-button>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form:{
        username:'',
        password:''
      },

    };
  },
  created() {
  },
  methods: {
   async save() {
      const res = await this.$http.post('/rest/admin_users',this.form)
      console.log(res)
    },

  },
};
</script>